package com.chen.service.material;

import com.chen.dao.MaterialMapper;
import com.chen.pojo.Material;
import com.chen.vo.MaterialVo;

import java.util.List;

public class MaterialServiceImpl implements MaterialService {
    private MaterialMapper materialMapper;
    public void setMaterialMapper(MaterialMapper materialMapper) {
        this.materialMapper = materialMapper;
    }

    public int addMaterial1(Material material) {
        return materialMapper.addMaterial1(material);
    }

    public int deleteMaterialById(int materialId) {
        return materialMapper.deleteMaterialById(materialId);
    }

    public int updateMaterial1(Material material) {
        return materialMapper.updateMaterial1(material);
    }

    public Material queryMaterialById(int materialId) {
        return materialMapper.queryMaterialById(materialId);
    }

    public List<Material> queryMaterialByBrand(String materialBrand) {
        return materialMapper.queryMaterialByBrand(materialBrand);
    }

    public List<Material> queryMaterialLike(String value) {
        return materialMapper.queryMaterialLike(value);
    }

    public List<Material> queryAllMaterial() {
        return materialMapper.queryAllMaterial();
    }

    public List<Material> list(MaterialVo materialVo) {
        return materialMapper.list(materialVo);
    }

    public int addMaterial(Material material) {
        return materialMapper.addMaterial(material);
    }

    public int updateMaterial(Material material) {
        return materialMapper.updateMaterial(material);
    }
}
